Recently mechanical drive systems are changed to electrical motor-drive systems in vehicles to meet requests for reducing space, improving assembling work and improving control ability. In one exemplary apparatus, as disclosed in JP-A-H07-81448, a motor is used to drive a shift range switchover mechanism of an automatic transmission of a vehicle. In this apparatus, a control shaft is coupled to a rotation shaft of the motor through a reduction mechanism so that the shift range is switched over by driving a range switchover valve by the control shaft. In this apparatus, a position sensor is provided to output a signal corresponding to a position of the range switchover valve. By utilizing a play (backlash) existing in a power transfer path from the motor to the position sensor, a detection value of the position sensor is learned as an output value of the position sensor indicating a specific shift range position. This learning is performed when a change in the detection value of the position sensor becomes small within a range, in which the detection value of the position sensor can be recognized as the specific shift range position, during a period of shift range switchover, that is, while the motor is rotationally driven.
It is proposed to switch over a shift range to a target range by using an encoder, which outputs a pulse signal in synchronism with rotation of the motor, and to rotationally drive the motor to a target rotation position (target count value), which corresponds to a target range, based on a count value of the pulse signal of the encoder (encoder count value). In this system, it is required to learn a reference position based on the encoder count value and control the amount of rotation (rotation angle) of the motor relative to the encoder count value indicating the reference position.
According to the above-described apparatus, however, the reference position is learned by the detection value of the position sensor, which is affected by a play amount existing in a power transfer path from the motor to the position sensor. It is therefore not possible to learn the reference position accurately based on the count of the encoder, which is attached in the power transfer path from the motor to the encoder without play) and outputs the pulse signal in synchronism with the rotation of the motor.